const url = require("url");
const href = 'http://www.xxx.com:8080/pathname?id=100#bbb';
const obj = url.parse(href,true);
console.log(obj.query.id);